import copy from './copy'
import { debounce, debounce2 } from './debounce'
import { longpress } from './longpress'
import preview from './preview'
import { inputNumber, input2Point, inputThousand } from './numberFormatter'

const directives = {
  copy: copy,
  debounce: debounce,
  debounce2: debounce2,
  longpress: longpress,
  preview: preview,
  inputNumber: inputNumber,
  input2Point: input2Point,
  inputThousand: inputThousand
}

export default function globalDirectivRegist(rootApp: any) {
  Object.keys(directives).forEach((k: string) => {
    rootApp.directive(k, directives[k as keyof typeof directives])
  })
}
